﻿using Microsoft.AspNetCore.Mvc;
using ZhCun.DBModel;
using ZhCun.RightsManage.AL;
using ZhCun.Utils;
using ZhCun.WebUtils;

namespace ZhCun.WebUtils.ApiControllers.RightsManage
{
    [ApiExplorerSettings(GroupName = "RightsManage")]
    public class ApiMenuController : BaseApiCrudController<MenuBLL, ArgMenuGetList, Sys_Menu, VSys_Menu>  //ApiAuthorizeController<ALMenu> //: ApiCRUDBaseController<ALMenu, ArgGetList, TSysMenu>
    {
        /// <summary>
        /// 更新菜单排序
        /// </summary>
        [HttpPost]
        public ApiResult UpdateOrder(dynamic obj)
        {
            string menuId = obj.MenuId; //obj.GetString("MenuId");
            int orderNo = obj.OrderNo; //obj.GetInt32("OrderNo");

            return BLLObj.UpdateOrder(menuId, orderNo);
        }
    }
}